-- GENERATED SPELL FOR [Slavering Ghoul] --


function spell0_1791(pUnit, Event) --@Thrash,Self--
pUnit:FullCastSpellOnTarget(3391,pUnit)
pUnit:RegisterEvent('Sorts_1791', 657, 1)
end

function spell1_1791(pUnit, Event) --@Toxic Saliva,n/a--
pUnit:FullCastSpellOnTarget(7125,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1791', 1500, 1)
end

function Sorts_1791(pUnit, Event)
local choix_sorts_1791 = math.random(0, 1)
if choix_sorts_1791 == 0 then
pUnit:RegisterEvent('spell0_1791', 1, 1)
end
if choix_sorts_1791 == 1 then
pUnit:RegisterEvent('spell1_1791', 1, 1)
end
end

function mob1791_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1791', math.random(1500, 3000), 1)
end

function mob1791_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1791_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1791_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1791, 1, 'mob1791_Action')
RegisterUnitEvent(1791, 2, 'mob1791_Leave')
RegisterUnitEvent(1791, 3, 'mob1791_Kill')
RegisterUnitEvent(1791, 4, 'mob1791_Die')
